<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::CachedMatrix&lt; Matrix &gt; Class Template Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="classshark_1_1_cached_matrix.html">CachedMatrix</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="classshark_1_1_cached_matrix-members.html">List of all members</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle"><div class="title">shark::CachedMatrix&lt; Matrix &gt; Class Template Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Efficient quadratic matrix cache.  
 <a href="classshark_1_1_cached_matrix.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_cached_matrix_8h_source.html">shark/LinAlg/CachedMatrix.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:acaaab3847ddd106bbcfda358609011a6" id="r_acaaab3847ddd106bbcfda358609011a6"><td class="memItemLeft" align="right" valign="top">typedef Matrix::QpFloatType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_cached_matrix.html#acaaab3847ddd106bbcfda358609011a6">QpFloatType</a></td></tr>
<tr class="separator:acaaab3847ddd106bbcfda358609011a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:acbf86b7470e20b4176d2ec56c6be2c8a" id="r_acbf86b7470e20b4176d2ec56c6be2c8a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_cached_matrix.html#acbf86b7470e20b4176d2ec56c6be2c8a">CachedMatrix</a> (Matrix *base, std::size_t cachesize=0x4000000)</td></tr>
<tr class="separator:acbf86b7470e20b4176d2ec56c6be2c8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09afc06315ddf58b64497d67886cb805" id="r_a09afc06315ddf58b64497d67886cb805"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_cached_matrix.html#a09afc06315ddf58b64497d67886cb805">row</a> (std::size_t k, std::size_t start, std::size_t end, <a class="el" href="classshark_1_1_cached_matrix.html#acaaab3847ddd106bbcfda358609011a6">QpFloatType</a> *storage) const</td></tr>
<tr class="memdesc:a09afc06315ddf58b64497d67886cb805"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies the range [start,end) of the k-th row of the matrix in external storage.  <br /></td></tr>
<tr class="separator:a09afc06315ddf58b64497d67886cb805"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bbb64e31e0b33409f9fe76b939d735e" id="r_a5bbb64e31e0b33409f9fe76b939d735e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_cached_matrix.html#acaaab3847ddd106bbcfda358609011a6">QpFloatType</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_cached_matrix.html#a5bbb64e31e0b33409f9fe76b939d735e">row</a> (std::size_t k, std::size_t start, std::size_t end)</td></tr>
<tr class="memdesc:a5bbb64e31e0b33409f9fe76b939d735e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a subset of a matrix row.  <br /></td></tr>
<tr class="separator:a5bbb64e31e0b33409f9fe76b939d735e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc663e94e28d7e35fd77b2c8b4889c07" id="r_acc663e94e28d7e35fd77b2c8b4889c07"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_cached_matrix.html#acaaab3847ddd106bbcfda358609011a6">QpFloatType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_cached_matrix.html#acc663e94e28d7e35fd77b2c8b4889c07">operator()</a> (std::size_t i, std::size_t j) const</td></tr>
<tr class="memdesc:acc663e94e28d7e35fd77b2c8b4889c07"><td class="mdescLeft">&#160;</td><td class="mdescRight">return a single matrix entry  <br /></td></tr>
<tr class="separator:acc663e94e28d7e35fd77b2c8b4889c07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00453296e3eca46e834420e3d20a6d6f" id="r_a00453296e3eca46e834420e3d20a6d6f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_cached_matrix.html#acaaab3847ddd106bbcfda358609011a6">QpFloatType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_cached_matrix.html#a00453296e3eca46e834420e3d20a6d6f">entry</a> (std::size_t i, std::size_t j) const</td></tr>
<tr class="memdesc:a00453296e3eca46e834420e3d20a6d6f"><td class="mdescLeft">&#160;</td><td class="mdescRight">return a single matrix entry  <br /></td></tr>
<tr class="separator:a00453296e3eca46e834420e3d20a6d6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad2529155a7ebf9ef3de0cacf46956d0" id="r_aad2529155a7ebf9ef3de0cacf46956d0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_cached_matrix.html#aad2529155a7ebf9ef3de0cacf46956d0">flipColumnsAndRows</a> (std::size_t i, std::size_t j)</td></tr>
<tr class="memdesc:aad2529155a7ebf9ef3de0cacf46956d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Swap the rows i and j and the columns i and j.  <br /></td></tr>
<tr class="separator:aad2529155a7ebf9ef3de0cacf46956d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff0ff1f338d99ff3030a321cd292140f" id="r_aff0ff1f338d99ff3030a321cd292140f"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_cached_matrix.html#aff0ff1f338d99ff3030a321cd292140f">size</a> () const</td></tr>
<tr class="memdesc:aff0ff1f338d99ff3030a321cd292140f"><td class="mdescLeft">&#160;</td><td class="mdescRight">return the size of the quadratic matrix  <br /></td></tr>
<tr class="separator:aff0ff1f338d99ff3030a321cd292140f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e3b71aa789c0cb4036f4bbf76313f9a" id="r_a4e3b71aa789c0cb4036f4bbf76313f9a"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_cached_matrix.html#a4e3b71aa789c0cb4036f4bbf76313f9a">getMaxCacheSize</a> () const</td></tr>
<tr class="memdesc:a4e3b71aa789c0cb4036f4bbf76313f9a"><td class="mdescLeft">&#160;</td><td class="mdescRight">return the size of the kernel cache (in "number of QpFloatType-s")  <br /></td></tr>
<tr class="separator:a4e3b71aa789c0cb4036f4bbf76313f9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53c29c87d1c481a928abf63171d45fbd" id="r_a53c29c87d1c481a928abf63171d45fbd"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_cached_matrix.html#a53c29c87d1c481a928abf63171d45fbd">getCacheSize</a> () const</td></tr>
<tr class="memdesc:a53c29c87d1c481a928abf63171d45fbd"><td class="mdescLeft">&#160;</td><td class="mdescRight">get currently used size of kernel cache (in "number of QpFloatType-s")  <br /></td></tr>
<tr class="separator:a53c29c87d1c481a928abf63171d45fbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a752febb4f36dd418bce1e8eeefbc549a" id="r_a752febb4f36dd418bce1e8eeefbc549a"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_cached_matrix.html#a752febb4f36dd418bce1e8eeefbc549a">getCacheRowSize</a> (std::size_t k) const</td></tr>
<tr class="memdesc:a752febb4f36dd418bce1e8eeefbc549a"><td class="mdescLeft">&#160;</td><td class="mdescRight">get length of one specific currently cached row  <br /></td></tr>
<tr class="separator:a752febb4f36dd418bce1e8eeefbc549a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64a43716271f03ac6415a5cecc4c1e5d" id="r_a64a43716271f03ac6415a5cecc4c1e5d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_cached_matrix.html#a64a43716271f03ac6415a5cecc4c1e5d">isCached</a> (std::size_t k) const</td></tr>
<tr class="separator:a64a43716271f03ac6415a5cecc4c1e5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af653442cee95203259116e1f4605ca35" id="r_af653442cee95203259116e1f4605ca35"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_cached_matrix.html#af653442cee95203259116e1f4605ca35">setMaxCachedIndex</a> (std::size_t n)</td></tr>
<tr class="memdesc:af653442cee95203259116e1f4605ca35"><td class="mdescLeft">&#160;</td><td class="mdescRight">Restrict the cached part of the matrix to the upper left nxn sub-matrix.  <br /></td></tr>
<tr class="separator:af653442cee95203259116e1f4605ca35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae000f8c2a306080058593b6ade36db12" id="r_ae000f8c2a306080058593b6ade36db12"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_cached_matrix.html#ae000f8c2a306080058593b6ade36db12">clear</a> ()</td></tr>
<tr class="memdesc:ae000f8c2a306080058593b6ade36db12"><td class="mdescLeft">&#160;</td><td class="mdescRight">completely clear/purge the kernel cache  <br /></td></tr>
<tr class="separator:ae000f8c2a306080058593b6ade36db12"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-attribs" name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:aec2edea13ec507ae67076d98cdfd687d" id="r_aec2edea13ec507ae67076d98cdfd687d"><td class="memItemLeft" align="right" valign="top">Matrix *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_cached_matrix.html#aec2edea13ec507ae67076d98cdfd687d">mep_baseMatrix</a></td></tr>
<tr class="memdesc:aec2edea13ec507ae67076d98cdfd687d"><td class="mdescLeft">&#160;</td><td class="mdescRight">matrix to be cached  <br /></td></tr>
<tr class="separator:aec2edea13ec507ae67076d98cdfd687d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8beb8003d800373adbea3036690f85d8" id="r_a8beb8003d800373adbea3036690f85d8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_l_r_u_cache.html">LRUCache</a>&lt; <a class="el" href="classshark_1_1_cached_matrix.html#acaaab3847ddd106bbcfda358609011a6">QpFloatType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_cached_matrix.html#a8beb8003d800373adbea3036690f85d8">m_cache</a></td></tr>
<tr class="memdesc:a8beb8003d800373adbea3036690f85d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">cache of the matrix lines  <br /></td></tr>
<tr class="separator:a8beb8003d800373adbea3036690f85d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;class Matrix&gt;<br />
class shark::CachedMatrix&lt; Matrix &gt;</div><p>Efficient quadratic matrix cache. </p>
<dl class="section user"><dt></dt><dd>The access operations of the <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a> class are specially tuned towards the iterative solution of quadratic programs resulting in sparse solutions.</dd></dl>
<dl class="section user"><dt></dt><dd>The kernel cache is probably one of the most intricate or mind-twisting parts of <a class="el" href="classshark_1_1_shark.html" title="Allows for querying compile settings at runtime. Provides the current command line arguments to the r...">Shark</a>. In order to fully understand it, reading the source code is essential and this description naturally not sufficient. However, the general ideas are as follows:</dd></dl>
<dl class="section user"><dt></dt><dd>A <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a> owns a pointer to a regular (non-cached) kernel matrix, the exact type of which is a template parameter. Through it, the actions of requesting an entry and propagating column-/row-flips are carried out. Even though a <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a> offers some methods also offered by the general <a class="el" href="classshark_1_1_kernel_matrix.html" title="Kernel Gram matrix.">KernelMatrix</a>, note that it does not inherit from it in order to offer greater flexibility.</dd></dl>
<dl class="section user"><dt></dt><dd>The <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a> defines a struct tCacheEntry, which represents one row of varying length of a stored kernel matrix. The structure aggregates a pointer to the kernel values (stored as values of type CacheType); the number of stored values; and the indices of the next older and newer cache entries. The latter two indices pertain to the fact that the <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a> maintains two different "orders" of the examples: one related to location in memory, and the other related to last usage time, see below. During the lifetime of a <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a>, it will hold a vector of the length of the number of examples of tCacheEntry: one entry for each example. When an example has no kernel values in the cache, its tCacheEntry.length will be 0, its tCacheEntry.data will be NULL, and its older and newer variables will be SHARK_CACHEDMATRIX_NULL_REFERENCE. Otherwise, the entries take their corresponding meaningful values. In particular for tCacheEntry.data, memory is dynamically allocated via malloc, reallocated via realloc, and freed via free as fit.</dd></dl>
<dl class="section user"><dt></dt><dd>A basic operation the <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a> must support is throwing away old stored values to make room for new values, because it is very common that not all values fit into memory (otherwise, consider the <a class="el" href="classshark_1_1_precomputed_matrix.html" title="Precomputed version of a matrix for quadratic programming.">PrecomputedMatrix</a> class). When a new row is requested via row(..), but no room to store it, row(..) has two options for making space:</dd></dl>
<dl class="section user"><dt></dt><dd>First option: first, the row method checks if the member index m_truncationColumnIndex is lower than the overall number of examples. If so, it goes through all existing rows and shortens them to a length of m_truncationColumnIndex. Through this shortening, memory becomes available. In other words, m_truncationColumnIndex can be used to indicate to the <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a> that every row longer than m_truncationColumnIndex can be clipped at the end. By default, m_truncationColumnIndex is equal to the number of examples and not changed by the <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a>, so no clipping will occur if the <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a> is left to its own devices. However, m_truncationColumnIndex can be set from externally via setTruncationIndex(..) [this might be done after a shrinking event, for example]. Now imagine a situation where the cache is full, and the possibility exists to free some memory by truncating longer cache rows to length m_truncationColumnIndex. As soon as enough rows have been clipped for a new row to fit in, the <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a> computes the new row and passes back control. Most likely, the next time a new, uncached row is requested, more rows will have to get clipped. In order not to start checking if rows can be clipped from the very first row over again, the member variable m_truncationRowIndex internally stores where the chopping-procedure left off the last time. When a new row is requested and it's time to clear out old entries, it will start looking for choppable rows at this index to save time. In general, any chopping would happen via cacheResize(..) internally.</dd></dl>
<dl class="section user"><dt></dt><dd>Second option: if all rows have been chopped of at the end, or if this has never been an option (due to all rows being shorter or equal to m_truncationColumnIndex anyways), entire rows will get discarded as the second option. This will probably be the more common case. In general, row deletions will happen via cacheDelete(..) internally. The <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a> itself only resorts to a very simple heuristic in order to determine which rows to throw away to make room for new ones. Namely, the <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a> keeps track of the "age" or "oldness" of all cached rows. This happens via the so-to-speak factually doubly-linked list of indices in the tCacheEntry.older/newer entries, plus two class members m_cacheNewest and m_cacheOldest, which point to the beginning and end of this list. When row(..) wants to delete a cached row, it always does so on the row with index m_cacheOldest, and this index is then set to the next oldest row. Likewise, whenever a new row is requested, m_cacheNewest is set to point to that one. In order to allow for smarter heuristics, external classes may intervene with the deletion order via the methods cacheRedeclareOldest and cacheRedeclareNewest, which move an example to be deleted next or as late as possible, respectively.</dd></dl>
<dl class="section user"><dt></dt><dd>Two more drastic possibilites to influence the cache behaviour are cacheRowResize and cacheRowRelease, which both directly resize (e.g., chop off) cached row values or even discard the row altogether. In general however, it is preferred that the external application only indicate preferences for deletion, because it will usually not have information on the fullness of the cache (although this functionality could easily be added). </dd></dl>

<p class="definition">Definition at line <a class="el" href="_cached_matrix_8h_source.html#l00157">157</a> of file <a class="el" href="_cached_matrix_8h_source.html">CachedMatrix.h</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="acaaab3847ddd106bbcfda358609011a6" name="acaaab3847ddd106bbcfda358609011a6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acaaab3847ddd106bbcfda358609011a6">&#9670;&#160;</a></span>QpFloatType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef Matrix::QpFloatType <a class="el" href="classshark_1_1_cached_matrix.html">shark::CachedMatrix</a>&lt; Matrix &gt;::QpFloatType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_cached_matrix_8h_source.html#l00160">160</a> of file <a class="el" href="_cached_matrix_8h_source.html">CachedMatrix.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="acbf86b7470e20b4176d2ec56c6be2c8a" name="acbf86b7470e20b4176d2ec56c6be2c8a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acbf86b7470e20b4176d2ec56c6be2c8a">&#9670;&#160;</a></span>CachedMatrix()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_cached_matrix.html">shark::CachedMatrix</a>&lt; Matrix &gt;::CachedMatrix </td>
          <td>(</td>
          <td class="paramtype">Matrix *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>cachesize</em> = <code>0x4000000</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Constructor </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Matrix to cache </td></tr>
    <tr><td class="paramname">cachesize</td><td>Main memory to use as a kernel cache, in QpFloatTypes. Default is 256MB if QpFloatType is float, 512 if double. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_cached_matrix_8h_source.html#l00165">165</a> of file <a class="el" href="_cached_matrix_8h_source.html">CachedMatrix.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ae000f8c2a306080058593b6ade36db12" name="ae000f8c2a306080058593b6ade36db12"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae000f8c2a306080058593b6ade36db12">&#9670;&#160;</a></span>clear()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_cached_matrix.html">shark::CachedMatrix</a>&lt; Matrix &gt;::clear </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>completely clear/purge the kernel cache </p>

<p class="definition">Definition at line <a class="el" href="_cached_matrix_8h_source.html#l00287">287</a> of file <a class="el" href="_cached_matrix_8h_source.html">CachedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_l_r_u_cache.html#afd6ed6c3442f200616f4c7d4cee32144">shark::LRUCache&lt; T &gt;::clear()</a>, and <a class="el" href="classshark_1_1_cached_matrix.html#a8beb8003d800373adbea3036690f85d8">shark::CachedMatrix&lt; Matrix &gt;::m_cache</a>.</p>

</div>
</div>
<a id="a00453296e3eca46e834420e3d20a6d6f" name="a00453296e3eca46e834420e3d20a6d6f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a00453296e3eca46e834420e3d20a6d6f">&#9670;&#160;</a></span>entry()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_cached_matrix.html#acaaab3847ddd106bbcfda358609011a6">QpFloatType</a> <a class="el" href="classshark_1_1_cached_matrix.html">shark::CachedMatrix</a>&lt; Matrix &gt;::entry </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>j</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>return a single matrix entry </p>

<p class="definition">Definition at line <a class="el" href="_cached_matrix_8h_source.html#l00214">214</a> of file <a class="el" href="_cached_matrix_8h_source.html">CachedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_cached_matrix.html#aec2edea13ec507ae67076d98cdfd687d">shark::CachedMatrix&lt; Matrix &gt;::mep_baseMatrix</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_cached_matrix.html#acc663e94e28d7e35fd77b2c8b4889c07">shark::CachedMatrix&lt; Matrix &gt;::operator()()</a>.</p>

</div>
</div>
<a id="aad2529155a7ebf9ef3de0cacf46956d0" name="aad2529155a7ebf9ef3de0cacf46956d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aad2529155a7ebf9ef3de0cacf46956d0">&#9670;&#160;</a></span>flipColumnsAndRows()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_cached_matrix.html">shark::CachedMatrix</a>&lt; Matrix &gt;::flipColumnsAndRows </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>j</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Swap the rows i and j and the columns i and j. </p>
<dl class="section user"><dt></dt><dd>It may be advantageous for caching to reorganize the column order. In order to keep symmetric matrices symmetric the rows are swapped, too. This corresponds to swapping the corresponding variables.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">i</td><td>first row/column index </td></tr>
    <tr><td class="paramname">j</td><td>second row/column index </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_cached_matrix_8h_source.html#l00230">230</a> of file <a class="el" href="_cached_matrix_8h_source.html">CachedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_l_r_u_cache.html#a2848536687dec954b5ec1cea247866eb">shark::LRUCache&lt; T &gt;::getLinePointer()</a>, <a class="el" href="classshark_1_1_l_r_u_cache.html#ad8cae64a351bdef5e03976d1e5176072">shark::LRUCache&lt; T &gt;::lineLength()</a>, <a class="el" href="classshark_1_1_cached_matrix.html#a8beb8003d800373adbea3036690f85d8">shark::CachedMatrix&lt; Matrix &gt;::m_cache</a>, <a class="el" href="classshark_1_1_cached_matrix.html#aec2edea13ec507ae67076d98cdfd687d">shark::CachedMatrix&lt; Matrix &gt;::mep_baseMatrix</a>, <a class="el" href="classshark_1_1_cached_matrix.html#aff0ff1f338d99ff3030a321cd292140f">shark::CachedMatrix&lt; Matrix &gt;::size()</a>, and <a class="el" href="classshark_1_1_l_r_u_cache.html#af995657d3a4cd3c7c85550e0fb056985">shark::LRUCache&lt; T &gt;::swapLineIndices()</a>.</p>

</div>
</div>
<a id="a752febb4f36dd418bce1e8eeefbc549a" name="a752febb4f36dd418bce1e8eeefbc549a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a752febb4f36dd418bce1e8eeefbc549a">&#9670;&#160;</a></span>getCacheRowSize()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t <a class="el" href="classshark_1_1_cached_matrix.html">shark::CachedMatrix</a>&lt; Matrix &gt;::getCacheRowSize </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>k</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get length of one specific currently cached row </p>

<p class="definition">Definition at line <a class="el" href="_cached_matrix_8h_source.html#l00265">265</a> of file <a class="el" href="_cached_matrix_8h_source.html">CachedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_l_r_u_cache.html#ad8cae64a351bdef5e03976d1e5176072">shark::LRUCache&lt; T &gt;::lineLength()</a>, and <a class="el" href="classshark_1_1_cached_matrix.html#a8beb8003d800373adbea3036690f85d8">shark::CachedMatrix&lt; Matrix &gt;::m_cache</a>.</p>

</div>
</div>
<a id="a53c29c87d1c481a928abf63171d45fbd" name="a53c29c87d1c481a928abf63171d45fbd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a53c29c87d1c481a928abf63171d45fbd">&#9670;&#160;</a></span>getCacheSize()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t <a class="el" href="classshark_1_1_cached_matrix.html">shark::CachedMatrix</a>&lt; Matrix &gt;::getCacheSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get currently used size of kernel cache (in "number of QpFloatType-s") </p>

<p class="definition">Definition at line <a class="el" href="_cached_matrix_8h_source.html#l00261">261</a> of file <a class="el" href="_cached_matrix_8h_source.html">CachedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_cached_matrix.html#a8beb8003d800373adbea3036690f85d8">shark::CachedMatrix&lt; Matrix &gt;::m_cache</a>, and <a class="el" href="classshark_1_1_l_r_u_cache.html#ae089a1943125f1be80d521caaefdfd0e">shark::LRUCache&lt; T &gt;::size()</a>.</p>

</div>
</div>
<a id="a4e3b71aa789c0cb4036f4bbf76313f9a" name="a4e3b71aa789c0cb4036f4bbf76313f9a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e3b71aa789c0cb4036f4bbf76313f9a">&#9670;&#160;</a></span>getMaxCacheSize()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t <a class="el" href="classshark_1_1_cached_matrix.html">shark::CachedMatrix</a>&lt; Matrix &gt;::getMaxCacheSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>return the size of the kernel cache (in "number of QpFloatType-s") </p>

<p class="definition">Definition at line <a class="el" href="_cached_matrix_8h_source.html#l00257">257</a> of file <a class="el" href="_cached_matrix_8h_source.html">CachedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_cached_matrix.html#a8beb8003d800373adbea3036690f85d8">shark::CachedMatrix&lt; Matrix &gt;::m_cache</a>, and <a class="el" href="classshark_1_1_l_r_u_cache.html#a54c4f8d27361379cc684a5f3bd0ad2c5">shark::LRUCache&lt; T &gt;::maxSize()</a>.</p>

</div>
</div>
<a id="a64a43716271f03ac6415a5cecc4c1e5d" name="a64a43716271f03ac6415a5cecc4c1e5d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a64a43716271f03ac6415a5cecc4c1e5d">&#9670;&#160;</a></span>isCached()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classshark_1_1_cached_matrix.html">shark::CachedMatrix</a>&lt; Matrix &gt;::isCached </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>k</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_cached_matrix_8h_source.html#l00268">268</a> of file <a class="el" href="_cached_matrix_8h_source.html">CachedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_l_r_u_cache.html#aa7fe0128f8b11bfab3e6e89d0544b4dd">shark::LRUCache&lt; T &gt;::isCached()</a>, and <a class="el" href="classshark_1_1_cached_matrix.html#a8beb8003d800373adbea3036690f85d8">shark::CachedMatrix&lt; Matrix &gt;::m_cache</a>.</p>

</div>
</div>
<a id="acc663e94e28d7e35fd77b2c8b4889c07" name="acc663e94e28d7e35fd77b2c8b4889c07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acc663e94e28d7e35fd77b2c8b4889c07">&#9670;&#160;</a></span>operator()()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_cached_matrix.html#acaaab3847ddd106bbcfda358609011a6">QpFloatType</a> <a class="el" href="classshark_1_1_cached_matrix.html">shark::CachedMatrix</a>&lt; Matrix &gt;::operator() </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>j</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>return a single matrix entry </p>

<p class="definition">Definition at line <a class="el" href="_cached_matrix_8h_source.html#l00209">209</a> of file <a class="el" href="_cached_matrix_8h_source.html">CachedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_cached_matrix.html#a00453296e3eca46e834420e3d20a6d6f">shark::CachedMatrix&lt; Matrix &gt;::entry()</a>.</p>

</div>
</div>
<a id="a5bbb64e31e0b33409f9fe76b939d735e" name="a5bbb64e31e0b33409f9fe76b939d735e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5bbb64e31e0b33409f9fe76b939d735e">&#9670;&#160;</a></span>row() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_cached_matrix.html#acaaab3847ddd106bbcfda358609011a6">QpFloatType</a> * <a class="el" href="classshark_1_1_cached_matrix.html">shark::CachedMatrix</a>&lt; Matrix &gt;::row </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>k</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>end</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return a subset of a matrix row. </p>
<dl class="section user"><dt></dt><dd>This method returns an array of QpFloatType with at least the entries in the interval [begin, end[ filled in.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>matrix row </td></tr>
    <tr><td class="paramname">start</td><td>first column to be filled in </td></tr>
    <tr><td class="paramname">end</td><td>last column to be filled in +1 </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_cached_matrix_8h_source.html#l00197">197</a> of file <a class="el" href="_cached_matrix_8h_source.html">CachedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_l_r_u_cache.html#a1d1d221a9216657a86b799233d80c1af">shark::LRUCache&lt; T &gt;::getCacheLine()</a>, <a class="el" href="classshark_1_1_l_r_u_cache.html#ad8cae64a351bdef5e03976d1e5176072">shark::LRUCache&lt; T &gt;::lineLength()</a>, <a class="el" href="classshark_1_1_cached_matrix.html#a8beb8003d800373adbea3036690f85d8">shark::CachedMatrix&lt; Matrix &gt;::m_cache</a>, and <a class="el" href="classshark_1_1_cached_matrix.html#aec2edea13ec507ae67076d98cdfd687d">shark::CachedMatrix&lt; Matrix &gt;::mep_baseMatrix</a>.</p>

</div>
</div>
<a id="a09afc06315ddf58b64497d67886cb805" name="a09afc06315ddf58b64497d67886cb805"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a09afc06315ddf58b64497d67886cb805">&#9670;&#160;</a></span>row() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_cached_matrix.html">shark::CachedMatrix</a>&lt; Matrix &gt;::row </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>k</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>end</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classshark_1_1_cached_matrix.html#acaaab3847ddd106bbcfda358609011a6">QpFloatType</a> *&#160;</td>
          <td class="paramname"><em>storage</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Copies the range [start,end) of the k-th row of the matrix in external storage. </p>
<p>This call regards the access to the line as out-of-order, thus the cache is not influenced. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>the index of the row </td></tr>
    <tr><td class="paramname">start</td><td>the index of the first element in the range </td></tr>
    <tr><td class="paramname">end</td><td>the index of the last element in the range </td></tr>
    <tr><td class="paramname">storage</td><td>the external storage. must be big enough capable to hold the range </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_cached_matrix_8h_source.html#l00175">175</a> of file <a class="el" href="_cached_matrix_8h_source.html">CachedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_l_r_u_cache.html#a2848536687dec954b5ec1cea247866eb">shark::LRUCache&lt; T &gt;::getLinePointer()</a>, <a class="el" href="classshark_1_1_l_r_u_cache.html#ad8cae64a351bdef5e03976d1e5176072">shark::LRUCache&lt; T &gt;::lineLength()</a>, <a class="el" href="classshark_1_1_cached_matrix.html#a8beb8003d800373adbea3036690f85d8">shark::CachedMatrix&lt; Matrix &gt;::m_cache</a>, <a class="el" href="classshark_1_1_cached_matrix.html#aec2edea13ec507ae67076d98cdfd687d">shark::CachedMatrix&lt; Matrix &gt;::mep_baseMatrix</a>, <a class="el" href="classshark_1_1_cached_matrix.html#aff0ff1f338d99ff3030a321cd292140f">shark::CachedMatrix&lt; Matrix &gt;::size()</a>, and <a class="el" href="_exception_8h.html#a42a6a50e4d06c00d60fbca5333f40768">SIZE_CHECK</a>.</p>

</div>
</div>
<a id="af653442cee95203259116e1f4605ca35" name="af653442cee95203259116e1f4605ca35"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af653442cee95203259116e1f4605ca35">&#9670;&#160;</a></span>setMaxCachedIndex()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_cached_matrix.html">shark::CachedMatrix</a>&lt; Matrix &gt;::setMaxCachedIndex </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>n</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Restrict the cached part of the matrix to the upper left nxn sub-matrix. </p>

<p class="definition">Definition at line <a class="el" href="_cached_matrix_8h_source.html#l00272">272</a> of file <a class="el" href="_cached_matrix_8h_source.html">CachedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_cached_matrix.html#a8beb8003d800373adbea3036690f85d8">shark::CachedMatrix&lt; Matrix &gt;::m_cache</a>, <a class="el" href="classshark_1_1_l_r_u_cache.html#a738129f952a28aa14f35c952079d0a7e">shark::LRUCache&lt; T &gt;::markLineForDeletion()</a>, <a class="el" href="classshark_1_1_cached_matrix.html#aff0ff1f338d99ff3030a321cd292140f">shark::CachedMatrix&lt; Matrix &gt;::size()</a>, and <a class="el" href="_exception_8h.html#a42a6a50e4d06c00d60fbca5333f40768">SIZE_CHECK</a>.</p>

</div>
</div>
<a id="aff0ff1f338d99ff3030a321cd292140f" name="aff0ff1f338d99ff3030a321cd292140f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aff0ff1f338d99ff3030a321cd292140f">&#9670;&#160;</a></span>size()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t <a class="el" href="classshark_1_1_cached_matrix.html">shark::CachedMatrix</a>&lt; Matrix &gt;::size </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>return the size of the quadratic matrix </p>

<p class="definition">Definition at line <a class="el" href="_cached_matrix_8h_source.html#l00253">253</a> of file <a class="el" href="_cached_matrix_8h_source.html">CachedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_cached_matrix.html#aec2edea13ec507ae67076d98cdfd687d">shark::CachedMatrix&lt; Matrix &gt;::mep_baseMatrix</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_cached_matrix.html#aad2529155a7ebf9ef3de0cacf46956d0">shark::CachedMatrix&lt; Matrix &gt;::flipColumnsAndRows()</a>, <a class="el" href="classshark_1_1_cached_matrix.html#a09afc06315ddf58b64497d67886cb805">shark::CachedMatrix&lt; Matrix &gt;::row()</a>, and <a class="el" href="classshark_1_1_cached_matrix.html#af653442cee95203259116e1f4605ca35">shark::CachedMatrix&lt; Matrix &gt;::setMaxCachedIndex()</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a8beb8003d800373adbea3036690f85d8" name="a8beb8003d800373adbea3036690f85d8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8beb8003d800373adbea3036690f85d8">&#9670;&#160;</a></span>m_cache</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_l_r_u_cache.html">LRUCache</a>&lt;<a class="el" href="classshark_1_1_cached_matrix.html#acaaab3847ddd106bbcfda358609011a6">QpFloatType</a>&gt; <a class="el" href="classshark_1_1_cached_matrix.html">shark::CachedMatrix</a>&lt; Matrix &gt;::m_cache</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>cache of the matrix lines </p>

<p class="definition">Definition at line <a class="el" href="_cached_matrix_8h_source.html#l00293">293</a> of file <a class="el" href="_cached_matrix_8h_source.html">CachedMatrix.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_cached_matrix.html#ae000f8c2a306080058593b6ade36db12">shark::CachedMatrix&lt; Matrix &gt;::clear()</a>, <a class="el" href="classshark_1_1_cached_matrix.html#aad2529155a7ebf9ef3de0cacf46956d0">shark::CachedMatrix&lt; Matrix &gt;::flipColumnsAndRows()</a>, <a class="el" href="classshark_1_1_cached_matrix.html#a752febb4f36dd418bce1e8eeefbc549a">shark::CachedMatrix&lt; Matrix &gt;::getCacheRowSize()</a>, <a class="el" href="classshark_1_1_cached_matrix.html#a53c29c87d1c481a928abf63171d45fbd">shark::CachedMatrix&lt; Matrix &gt;::getCacheSize()</a>, <a class="el" href="classshark_1_1_cached_matrix.html#a4e3b71aa789c0cb4036f4bbf76313f9a">shark::CachedMatrix&lt; Matrix &gt;::getMaxCacheSize()</a>, <a class="el" href="classshark_1_1_cached_matrix.html#a64a43716271f03ac6415a5cecc4c1e5d">shark::CachedMatrix&lt; Matrix &gt;::isCached()</a>, <a class="el" href="classshark_1_1_cached_matrix.html#a5bbb64e31e0b33409f9fe76b939d735e">shark::CachedMatrix&lt; Matrix &gt;::row()</a>, <a class="el" href="classshark_1_1_cached_matrix.html#a09afc06315ddf58b64497d67886cb805">shark::CachedMatrix&lt; Matrix &gt;::row()</a>, and <a class="el" href="classshark_1_1_cached_matrix.html#af653442cee95203259116e1f4605ca35">shark::CachedMatrix&lt; Matrix &gt;::setMaxCachedIndex()</a>.</p>

</div>
</div>
<a id="aec2edea13ec507ae67076d98cdfd687d" name="aec2edea13ec507ae67076d98cdfd687d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aec2edea13ec507ae67076d98cdfd687d">&#9670;&#160;</a></span>mep_baseMatrix</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Matrix* <a class="el" href="classshark_1_1_cached_matrix.html">shark::CachedMatrix</a>&lt; Matrix &gt;::mep_baseMatrix</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>matrix to be cached </p>

<p class="definition">Definition at line <a class="el" href="_cached_matrix_8h_source.html#l00291">291</a> of file <a class="el" href="_cached_matrix_8h_source.html">CachedMatrix.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_cached_matrix.html#a00453296e3eca46e834420e3d20a6d6f">shark::CachedMatrix&lt; Matrix &gt;::entry()</a>, <a class="el" href="classshark_1_1_cached_matrix.html#aad2529155a7ebf9ef3de0cacf46956d0">shark::CachedMatrix&lt; Matrix &gt;::flipColumnsAndRows()</a>, <a class="el" href="classshark_1_1_cached_matrix.html#a5bbb64e31e0b33409f9fe76b939d735e">shark::CachedMatrix&lt; Matrix &gt;::row()</a>, <a class="el" href="classshark_1_1_cached_matrix.html#a09afc06315ddf58b64497d67886cb805">shark::CachedMatrix&lt; Matrix &gt;::row()</a>, and <a class="el" href="classshark_1_1_cached_matrix.html#aff0ff1f338d99ff3030a321cd292140f">shark::CachedMatrix&lt; Matrix &gt;::size()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/shark/LinAlg/<a class="el" href="_cached_matrix_8h_source.html">CachedMatrix.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
